package com.bsj.media.media.resample.basic;

public class resamplerBasicFactory {

	public static resamplerBasic createResamplerBasic(boolean use_direct, int quality, boolean fail) {

		if (fail) {
			return new resamplerBasicZero();
		}

		if (use_direct) {
			if (quality > 8) {
				return new resamplerBasicDirectDouble();
			} else {
				return new resamplerBasicDirectSingle();
			}
		} else {
			if (quality > 8) {
				return new resamplerBasicInterpolateDouble();
			} else {
				return new resamplerBasicInterpolateSingle();
			}
		}

	}
}
